import com.zcs.pojo.Books;
import com.zcs.service.BookService;
import com.zcs.service.BookServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * Author : zcs
 * Data :  2021/8/21 10:16
 */
public class Mytest {
    @Test
    public void test(){
        ApplicationContext context= new ClassPathXmlApplicationContext("applicationContext.xml");
        BookService bookService= context.getBean("BookServiceImpl",BookService.class);
        List<Books> books = bookService.queryAllBook();
        for (Books book : books) {
            System.out.println(book);
        }
    }
}
